package com.yjz.designpattern.decorator_pattern;

// 具体装饰：权限控制
public class PermissionDecorator extends TextEditorDecorator {
    public PermissionDecorator(TextEditor textEditor) {
        super(textEditor);
    }

    @Override
    public String edit(String text) {
        // 添加权限控制逻辑
        System.out.println("Permission check");
        return textEditor.edit(text);
    }
}